#include "Chessboard.hpp"
#include "CriticalException.hpp"

Cell*	Chessboard::getCell(const Position& pos) const
{	return cells[pos.getRealX()][pos.getRealY()];	}

Chessboard::Chessboard()
{
	unsigned int i, j;
	
	for (i = 0; i < 8 ; i++)
	{
		for (j = 0; j < 8 ; j++)
			cells[i][j] = new Cell(Position(i, j));
	}			
}

Chessboard::~Chessboard()
{
	unsigned int i, j;
	
	for (i = 0; i < 8 ; i++)
	{
		for (j = 0; j < 8 ; j++)
			delete cells[i][j];
	}
}
